home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / User's Guide / C < prev   
Text File  |  1994-09-20  |  11KB  |  235 lines

  1. C  DOS Glossary
  2.        This  section uses Macintosh concepts to explain terms  that
  3.        MacDOS has inherited from DOS.
  4.  
  5.    batch
  6.        Many  Macintosh programs have their own scripting  language.
  7.        A  batch  program is nothing else than a script for  MacDOS:
  8.        you  prepare a file containing a series of commands and then
  9.        tell MacDOS to execute it.
  10.  
  11.        As  MacDOS  supports a character oriented  interface,  batch
  12.        and  interactive  commands are identical. This  is  not  the
  13.        case  in most (if not all) other Macintosh programs, because
  14.        they  are  normally controlled via dialogs and menus,  while
  15.        their  scripting languages, by their own nature, consist  of
  16.        written directives.
  17.  
  18.        Another  way of understanding batch programs is  to  compare
  19.        them  with macros. When you prepare a macro, you switch  the
  20.        macro  recording ON, perform some operations, and  stop  the
  21.        recorder.  By executing the macro, you can then  repeat  the
  22.        same  operations  over and over again. The  batch  mechanism
  23.        can  work  in  exactly the same way: you start logging  with
  24.        the  command LOG, type some commands, and stop the  logging.
  25.        By  executing the log file as a batch program, you can  then
  26.        repeat the same commands as many times as you like.
  27.  
  28.    cntl-C
  29.        By  pressing the 'C' key together with the control key,  you
  30.        force  MacDOS  to  prompt you for a  new  command.  This  is
  31.        useful  when you want to interrupt a long DIRectory  listing
  32.        or   any  other  operation.  cntl-C  also  interrupts  batch
  33.        programs.
  34.  
  35.        If  your  keyboard does not have the control  key,  you  can
  36.        achieve  the same result by pressing the command and  period
  37.        keys together (cmd-dot).
  38.  
  39.        In  some cases, especially during recursive operations,  you
  40.        might  have  to type cntl-C (or cmd-dot) more than  once  in
  41.        order to interrupt MacDOS.
  42.  
  43.    command
  44.        A  command is just a way of telling MacDOS all it  needs  to
  45.        know  in order to perform a particular operation. The  first
  46.        word  in a command (ie. the command name) tells MacDOS  what
  47.        to  do,  while  the other words (ie. command parameters  and
  48.        switches) specify on what it should operate and how.
  49.  
  50.        A  command  with  switches is a bit like a  menu:  when  you
  51.        select  a menu, you can choose between different options  by
  52.        selecting  a particular menu item. When you type  a  command
  53.        in  MacDOS,  you  can  choose between different  options  by
  54.        typing particular switches.
  55.  
  56.    delete
  57.        The  word "delete" always refers to files, never to folders.
  58.        When  you  use  the  command DEL  to  delete  files,  MacDOS
  59.        removes  the  corresponding entry from the  disk  directory.
  60.        The  result  is that the file immediately "disappears"  from
  61.        the  system and the space it occupied is made available  for
  62.        other  uses.  This  is  VERY  different  from  the  standard
  63.        behaviour of the Finder, which only removes files  from  the
  64.        system when you empty the Trash.
  65.  
  66.    directory
  67.        "directory" essentially is a synonym of "folder".  In  fact,
  68.        the  term  "folder"  was only introduced together  with  the
  69.        desktop  metaphor. By then, UNIX users were already familiar
  70.        with commands like CD and MKDIR.
  71.  
  72.        Sometimes,  the  term  "directory" is  used  to  indicate  a
  73.        "directory  list" produced with the command DIR. This  might
  74.        not  be  entirely  correct, but it does not normally  create
  75.        any confusion.
  76.  
  77.    drive
  78.        Drives  are  physical devices which let you  access  storage
  79.        media.  To  distinguish between different drives,  operating
  80.        systems  number  them. For example, the Mac OS  assigns  the
  81.        number  1 to the internal floppy drive and 2 to the external
  82.        one. DOS uses the letters A and B for the same purpose.
  83.  
  84.        The "drive numbers" of the Macintosh and the "drive IDs"  of
  85.        DOS are basically the same thing.
  86.  
  87.    extension
  88.        The  Mac  OS associates a series of parameters and flags  to
  89.        each  file  in  the  system. In  that  way,  it  can  decide
  90.        whether, how, and where each file icon should appear on  the
  91.        desktop.  Just  by  looking at an  icon,  you  can  normally
  92.        distinguish    between    applications    and     documents.
  93.        Furthermore,   you  can  also  identify  which   application
  94.        created each document.
  95.  
  96.        DOS  does not have the capabilities of the Mac OS. In  order
  97.        to  distinguish  between different file  types,  DOS  splits
  98.        each  filename into two parts separated by a dot,  and  uses
  99.        the  second  part  to identify the type. That  second  part,
  100.        which  cannot exceed three characters in length,  is  called
  101.        the  "extension" (nothing to do with the MacDOS  extensions,
  102.        which  are  filter applications). Generic text files  should
  103.        have  the  extension TXT, batch programs  BAT,  applications
  104.        EXE (for EXEcutable), documents DOC, etc.
  105.  
  106.        This  strategy,  at  least as it has been  implemented,  can
  107.        cause  quite  a bit of confusion. This is due  to  the  fact
  108.        that   DOS   does  not  (and  cannot)  enforce  the   naming
  109.        conventions.  Therefore, you are totally  free  to  use  the
  110.        extensions  as you like. For example, you can  call  a  text
  111.        file   readme.doc  or an application  process.txt . You  can
  112.        also   create   non-standard   names   like    use.me     or
  113.        this_is.it  .  As if this were not enough, you  cannot  even
  114.        distinguish    between   files   created   with    different
  115.        applications.  For example, a file called   book.doc   could
  116.        have been produced with any word processor.
  117.  
  118.    file
  119.        In  "Inside  Macintosh Vol 2", Apple states: "A  file  is  a
  120.        named,  ordered sequence of bytes". This is also  applicable
  121.        to  DOS  files.  Both with DOS and the Mac OS  you  normally
  122.        operate  on  files  as single entities,  although  Macintosh
  123.        files  consist of two separate forks. In some cases,  MacDOS
  124.        lets you operate separately on Data and Resource forks.
  125.  
  126.    global variables
  127.        Global   variables  have  two  main  functions:   to   store
  128.        temporary   information  during  the  execution   of   batch
  129.        programs and to memorise your "preferences" if you set  them
  130.        within  autoexec.bat .
  131.  
  132.    parameter
  133.        In  most  cases,  parameters identify  the  items  on  which
  134.        commands  and  batch programs operate. Many commands  expect
  135.        file or folder specifications as parameters. Therefore,  the
  136.        passing  of parameters to a MacDOS command often corresponds
  137.        to  filling  in text fields in a Macintosh dialog  box  (eg.
  138.        after selecting the "Open..." or "Save as..." menu items).
  139.  
  140.    path
  141.        A  path is nothing else than the list of folders you have to
  142.        enter  in order to reach a particular item (file or folder).
  143.        The  MacDOS  convention  is to use a backslash  to  separate
  144.        adjacent folder names.
  145.  
  146.        A  path  which  begins  with  a  backslash  is  said  to  be
  147.        "absolute"  and  indicates that you have to  start  entering
  148.        folders from the outermost one. A path which begins  with  a
  149.        folder  name  (ie.  not  with a backslash)  is  said  to  be
  150.        "relative",  and indicates that your starting point  is  the
  151.        current  folder. The fictitious folder name  ".."  indicates
  152.        that  you  have to enter the folder which contains  the  one
  153.        you are currently in.
  154.  
  155.        When  you  add  a folder name to a path, it  is  as  if  you
  156.        memorised  the  double-clicking on the corresponding  folder
  157.        icon.
  158.  
  159.    pipe
  160.        A  pipe  is a way of using the output of a command as  input
  161.        to another command.
  162.  
  163.        In  Macintosh terms, the closest thing to a pipe is to "Cut"
  164.        and   "Paste"   or  "Drag"  and  "Drop"  between   different
  165.        applications.
  166.  
  167.    prompt
  168.        MacDOS  displays the command prompt to let you know that  it
  169.        is  ready to accept a new command. This is equivalent to the
  170.        Finder changing the cursor from a watch back to an arrow.
  171.  
  172.        Other  prompts (eg. when asking confirmation before deleting
  173.        a  file) are equivalent to displaying dialog boxes like  the
  174.        "...Are  you sure you want to permanently remove it?"  alert
  175.        that you get when you empty the Trash.
  176.  
  177.    redirection
  178.        Many  commands  display information on the  monitor  screen.
  179.        Some, like DIR and TYPE, do nothing else. Others, like  COPY
  180.        and  RENAME, do it to inform you of their progress.  In  all
  181.        cases,  you  can save that information for later examination
  182.        and  processing by redirecting the command output to a  disk
  183.        file.
  184.  
  185.        Similarly,  input  redirection lets you prepare  input  data
  186.        off-line  and then use it when you need it, thereby  freeing
  187.        you from the task of typing it interactively.
  188.  
  189.        As  both  output to the monitor and input from the  keyboard
  190.        consist of ASCII characters, files used for redirection  are
  191.        always of type 'TEXT'.
  192.  
  193.        In  a sense, I/O redirection is similar to the "export"  and
  194.        "import" functions of many Macintosh applications.
  195.  
  196.    root
  197.        The  "root"  is the filing cabinet where you keep  all  your
  198.        folders.  As there is exactly one root per volume (ie.  hard
  199.        disk  partition,  floppy, etc.), for all practical  purposes
  200.        you can identify the root with the volume itself.
  201.  
  202.        When   you   format   a   floppy,   the   Operating   System
  203.        automatically creates the "root". It is then up  to  you  to
  204.        grow   "trunk"   folders  and  "branch"  off  into   further
  205.        subfolders.  The  "leaves"  of such  a  directory  tree  are
  206.        files,  which  you  are  not allowed  to  further  subdivide
  207.        (although  the  Macintosh still gives you two  "forks").  In
  208.        the  Macintosh environment, the root is represented  by  the
  209.        window that you get when you double click on a volume icon.
  210.  
  211.    switch
  212.        A  DOS  switch is a part of a command which lets you  enable
  213.        or   disable  optional  features  of  the  command.  In  its
  214.        simplest  form, a switch consists of a slash followed  by  a
  215.        letter  of the alphabet, but switches which control powerful
  216.        options are more complex than that.
  217.  
  218.        The  Macintosh equivalent of a switch is an option that  you
  219.        can  select  via a dialog box. For example, when you  select
  220.        the  "Print..." menu item, you are presented with  a  dialog
  221.        box  which  lets you select page ranges, number  of  copies,
  222.        etc.   In  DOS,  you  would select those options  by  adding
  223.        switches to the PRINT command.
  224.  
  225.    wildcarding
  226.        Wildcarding  is  a way of selecting group of  files  on  the
  227.        basis  of  parts  of  their names. In most  cases,  you  can
  228.        operate  on  wildcarded filenames as you  would  operate  on
  229.        single files, leaving to DOS the task of repeating the  same
  230.        action  on  each individual file. The Macintosh Finder  lets
  231.        you  "Find..."  files  with names  containing  a  particular
  232.        string,  but  then you still have to access the  files  with
  233.        the mouse.
  234.  
  235.